/***************************************************************************
 *   Copyright (C) 2010 by Dmitry 'Krasu' Baryshev                         *
 *   ksquirrel.iv@gmail.com                                                *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 3 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

#include <QApplication>

#if defined(Q_WS_X11)
#include "netwm.h"
#else
#error This program will work only in X11
#endif

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    NETWM::init();

    QList<Window> list = NETWM::netwmWindowList();
    uint desktops = NETWM::netwmDesktopsNumber();

    qDebug("Window manager uses composite extension: %s", NETWM::isComposite() ? "yes" : "no");

    qDebug("Window ids currently available:");

    foreach(Window w, list)
    {
        qDebug("%ld", w);
    }

    qDebug("Number of desktops: %u", desktops);

    return 0;
}
